package com.hjw.entity;

import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * <p>Project:Academic - Comment
 *
 * @author IvanWei玮 -- maste
 * @version 1.0
 * @DataTime 2025/2/13 16:19
 * @since 1.8
 */
@Getter
@Setter
public class Comment {
    private int id;
    private int uid;
    private Book book;
    private double rate;
    private String content;
    private String nickname;
    private String img;
    private Date tpost;

    public Comment() {
        this.id = 0;
        this.uid = 0;
        this.book = new Book();
        this.rate = 0.0;
        this.content = "";
        this.nickname = "";
        this.img = "";
        this.tpost = new Date();
    }

    @Override
    public String toString() {
        return "Comment{" +
                "id=" + id +
                ", uid=" + uid +
                ", bId=" + book +
                ", rate=" + rate +
                ", content='" + content + '\'' +
                ", nickname='" + nickname + '\'' +
                ", img='" + img + '\'' +
                ", tpost=" + tpost +
                '}';
    }
}
